package cn.john.hrm.feign;

import cn.john.hrm.util.AjaxResult;
import feign.hystrix.FallbackFactory;

public class DeleteCourseDocFallBackFactory implements FallbackFactory<DeleteCourseDocClient> {
    @Override
    public DeleteCourseDocClient create(Throwable throwable) {
        return new DeleteCourseDocClient() {
            @Override
            public AjaxResult delete(Long id) {
                return AjaxResult.me().setSuccess(false).setMessage("系统异常,课程下线失败，请联系管理员");
            }
        };
    }
}
